home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / utilities / packers / audcompv2.lha / AudComp.readme < prev   
Encoding:
Text File  |  1995-03-15  |  12.0 KB  |  275 lines

  1.                                  AudComp V2.0
  2.                                by: Dan Charrois
  3.                                 March 10, 1995
  4.  
  5.  
  6. LIMITATION OF LIABILITY
  7.  
  8. No representations or warranties are stated or implied with respect to
  9. the accuracy, reliability, performance, or general operation of this
  10. software.  All usage must be accepted at your own risk.  The author does
  11. not assume any responsibility or liability whatsoever with respect to
  12. your use of this software.
  13.  
  14. BACKGROUND PROBLEM
  15.  
  16. Lately, there has been a great deal of interest in compressing data on the
  17. Amiga and other personal computers - and for good reason.  The size of the
  18. "average" executable and data files are increasing dramatically as
  19. programmers endeavour to make their software as complete as possible.
  20. Many algorithms have been written which do a wonderful job of compressing
  21. code and data, but until now, there has been a noticeable lack in software
  22. specifically designed to compress audio files.  Due to typical sampling
  23. rates of 10,000 samples/second and up, it doesn't take too long for a
  24. sample to use up a great deal of disk space.
  25.  
  26.  
  27. SOLUTION
  28.  
  29. To address this problem, I have created AudComp - a program which can
  30. both compress audio IFF 8SVX files to a fraction of their original size,
  31. and decompress the resulting files back into an audio IFF 8SVX.
  32.  
  33.  
  34. DISTRIBUTION
  35.  
  36. The following files are located in this archive:
  37.  
  38. AudComp.readme - this file
  39. AudComp.881    - AudComp for 68020+/68881 systems
  40. AudComp.000    - AudComp for 68000 systems
  41.  
  42. AudComp is freely distributable.  You are encouraged to spread the
  43. software to as many BBSes as you can, provided that this archive remains
  44. unmodified.
  45.  
  46.  
  47. WHAT IS THE DIFFERENCE BETWEEN VERSION 1 AND VERSION 2?
  48.  
  49. Strictly speaking, not a whole lot.  I originally distributed AudComp
  50. Version 1 as keyware.  My hopes were to make a bit of money in licensing
  51. out the software to interested individuals.  Unfortunately, not a single
  52. person registered the software.  I understood that this would not become
  53. the most frequently used piece of software in existence, but I honestly
  54. expected a bit better.
  55.  
  56. At any rate, I've come to the conclusion that it was pointless for me
  57. to have spent all that time and effort writing AudComp if nobody was
  58. able to use it.  So, I've released this version - Version 2.0.  The only
  59. principal difference between Version 1 and Version 2 is that you no
  60. longer need a keyfile.  Anyone may use the software in non-commercial
  61. applications, without restrictions, and without registration.
  62.  
  63. If you find it useful, however, I would appreciate a small donation.  If
  64. I see some support from this software, I might have time to extend the
  65. work further.  There are still lots of things which can be done!
  66.  
  67. Please send donations, postcards, or anything else you feel you can
  68. part with to:
  69.  
  70.                           Dan Charrois
  71.                           Box 75
  72.                           Legal, Alberta
  73.                           T0G 1L0
  74.                           CANADA
  75.  
  76.  
  77. IS THERE ANY OTHER SOFTWARE DESIGNED TO COMPRESS AUDIO IFF 8SVX FILES?
  78.  
  79. Strictly speaking, almost any compression algorithm should be able to
  80. reduce the size of an audio file somewhat.  However, non-lossy algorithms
  81. (algorithms which can restore the file back to its exact original form) such
  82. as Stefan Boberg's LHA usually do not perform any better than getting
  83. in the neighbourhood of a 20% file size reduction.
  84.  
  85. To get a substantial compression ratio, we must resort to lossy algorithms.
  86. This class of compression algorithm does not guarantee to decompress a file
  87. back to its exact original form, but instead will only try to come up with
  88. something approximating the original.  Ideally, this approximation should
  89. be almost indistinguishable from the original.  AudComp uses a lossy
  90. algorithm particularly designed for use with audio files to try and get
  91. the best results with as high a compression ratio as possible.
  92.  
  93. To my knowledge, the only other software currently in existence for the
  94. Amiga to compress audio files using a lossy algorithm are a few titles which
  95. support the Fibonacci-Delta encoded method (such as PerfectSound).
  96. This format (documented in the Amiga Rom Kernel Reference Manuals as an IFF
  97. standard), provides a fairly good compression ratio, though nowhere near
  98. as good as files created by AudComp.  Typically, files created using
  99. Fibonacci-Delta encoding take up half the disk space as uncompressed files,
  100. whereas AudComp routinely creates compressed files being 10 times smaller
  101. than the original or better!
  102.  
  103.  
  104. WHAT DOES "QUALITY" OF A COMPRESSION MEAN?
  105.  
  106. Some mention was made of the "quality" of compression a little earlier.
  107. This is simply some measure of how well the decompressed version of a
  108. file using a lossy algorithm varies from the original.  Fibonacci-Delta
  109. encoded audio files have a fixed "quality". AudComp, on the other hand,
  110. allows you to vary the quality of compression. If, for example, you were
  111. to choose a very high quality, the resulting compressed file would be
  112. relatively large (though usually still substantially smaller than a
  113. Fibonacci-Delta compressed file) , but upon decompressing the file
  114. the results would be virtually indistinguishable from the original.  If
  115. intelligibility is your only criteria, you can decrease the quality required,
  116. resulting in extremely high compression ratios.  This archive contains a
  117. few files of the same audio sample compressed at varying quality factors, to
  118. allow you to assess what different quality compressions sound like, and to
  119. give you an idea of the varying file sizes associated with each compression
  120. quality.
  121.  
  122.  
  123. WHAT KIND OF AUDIO FILES DOES IT WORK BEST ON?
  124.  
  125. The best results usually occur on audio files containing a digitization of
  126. speech.  In fact, the original purpose of this software was to provide
  127. a high compression for use with voice mail.  If intelligibility is your
  128. main criteria, you can usually bring the compression quality down to a point
  129. where you're compressing the files by a factor of 10 or more.  For
  130. compression of music, musical instruments, etc., you will find that you will
  131. need a fairly high quality compression to retain an acceptable harmonic
  132. range.  Nevertheless, even fairly high quality compressions using AudComp
  133. usually still require substantially less storage space than compressions
  134. using another method.
  135.  
  136.  
  137. HOW DOES AUDCOMP WORK?
  138.  
  139. Audcomp works by breaking up a sample into many smaller "windows".  The
  140. frequency content of each of these windows is evaluated, and less dominant
  141. frequencies are "thrown away" while the primary frequencies are encoded
  142. and stored in the compressed file.  This fairly simple process results
  143. in extremely high compression ratios, and although the compression is lossy,
  144. only the less dominant frequency terms are lost.
  145.  
  146. If you are a developer interested in including the ability for your
  147. software to compress and decompress audio files using the AudComp
  148. algorithms, the required object files are available, along with
  149. the required documentation and examples of their usage, for the fee of
  150. $100.00 in Canadian funds to the above address.  Source code can not be
  151. made available.
  152.  
  153. One interesting thing about files compressed using AudComp is that since
  154. they are not compressed using an algorithm similar to that used by LHA,
  155. Zoo, etc., they can be compressed even further by these other
  156. compression programs.  For example, LHA'ing a file compressed by AudComp
  157. can often reduce its size further by a third or more.
  158.  
  159.  
  160. WHY IS THE AUDCOMP EXECUTABLE SO BIG?
  161.  
  162. When determining the frequency content of a sample, AudComp makes use
  163. of the Fast Fourier Transform.  Despite its quick sounding name, it
  164. is still quite slow.  A `classical' FFT is heavily recursive, which
  165. tends to slow down its operation.  The FFT used in this package has
  166. been `unrolled' so that it is not recursive, resulting in a substantial
  167. speed improvement at an increase in code size.
  168.  
  169. The executable was compiled with SAS C V6.55, with full optimization on
  170. (which incidentally, took 16 hours to compile the two executables with
  171. my 33 Mhz 68030).
  172.  
  173.  
  174. COMPARISONS BETWEEN OTHER COMPRESSION ALGORITHMS
  175.  
  176. By far, AudComp's biggest selling feature is the dramatic compression ratios
  177. it can attain when compressing audio files.  Here is a brief summary of the
  178. results of compressing a sample audio file using a variety of different methods.
  179.  
  180. Compression Method         File Size       Compression factor
  181. ------------------         ---------       ------------------
  182. original                     60930                1.0X
  183. zoo                          50657                1.2X
  184. compress                     48039                1.3X
  185. lha                          43774                1.4X
  186. Fibonacci-Delta              30766                2.0X
  187. AudComp, quality 9           15852                3.8X
  188. AudComp, quality 9 + lha     10540                5.8X
  189. AudComp, quality 7            5568               10.9X
  190. AudComp, quality 7 + lha      4202               14.5X
  191. AudComp, quality 5            3279               18.6X
  192. AudComp, quality 5 + lha      2559               23.8X
  193. AudComp, quality 3            2133               28.6X
  194. AudComp, quality 3 + lha      1706               35.7X
  195.  
  196. Admittedly, an AudComp quality 3 file doesn't result in a very great
  197. sounding output when it is decompressed, but I think that the results
  198. of using AudComp are obvious.  To me personally, an AudComp quality
  199. 9 file often sounds better than a Fibonacci-Delta compressed file, and
  200. I usually still find voice files intelligible even when compressed down
  201. to a a quality of 5 or 6.
  202.  
  203.  
  204. USING THE AUDCOMPDEMO SOFTWARE
  205.  
  206. Before you start, keep in mind that you'll need a stack of at least 15000
  207. (20000 might be a bit better) to run the program.
  208.  
  209. One of the first things you'll notice in using the software on an
  210. unaccelerated Amiga is that the decompression is quite slow.  For this
  211. reason, two versions of the AudComp software are provided.
  212. AudComp.000 is provided for those with an unaccelerated Amiga (stock
  213. 68000), and AudComp.881 is provided for those with a 68020+ CPU and a
  214. math chip.  Suffice it to say that the version for accelerated
  215. computers is substantially faster than that for unaccelerated computers.
  216. Rename the appropriate version to `AudComp' and you won't have to worry
  217. about it ever again.
  218.  
  219. To compress an audio file, type
  220.  
  221.       AudComp c <decompressed filename > <compressed filename> <quality>
  222.   
  223. where <quality> is a number from 1 to 9 indicating the quality of
  224. compression desired (1=worst quality, highest compression, 9=best
  225. quality, lowest compression).  A status line will appear indicating
  226. how the compression is progressing.  When it is done, you will have
  227. created the compressed audio sample.
  228.  
  229. To decompress an AudComp-compressed file, type
  230.  
  231.       AudComp d <compressed filename> <decompressed filename>
  232.  
  233. A status line will appear below describing what portion of the decompression
  234. has been completed.  When the status line reaches 100%, the decompression
  235. is done.  You then have an IFF 8SVX audio file called whatever you specified
  236. when you called audcomp.  This can be played with any of the many IFF 8SVX
  237. sound players publicly available, such as "Sound" or "upd".
  238.  
  239.  
  240. FUTURE DIRECTIONS
  241.  
  242. Future versions of this software will depend on the success of the
  243. current version.  Some the things I would like to work on for future
  244. versions include:
  245.  
  246.   - Faster operation.  It may be possible to tweak a bit more speed out
  247.     of the algorithm.
  248.   - Better compression ratios.  Believe it or not, it may still be possible
  249.     to compress the files down a bit further yet.
  250.   - Better quality sound at a given compression ratio.
  251.   - GUI (Graphic User Interface) for Workbench users.
  252.  
  253.  
  254. FURTHER QUESTIONS
  255.  
  256. If you have any questions, comments, or suggestions regarding AudComp,
  257. please feel free to contact me.  If you have access to Internet email,
  258. my email account is "charro@ee.ualberta.ca".  And of course, you can
  259. always write to me at the postal address given earlier if you prefer.
  260.  
  261. Thanks for your interest in AudComp.
  262.  
  263. Dan Charrois
  264.  
  265.  
  266.  
  267. OTHER SOFTWARE PACKAGES REFERENCED IN THIS DOCUMENT
  268.  
  269. Lha           - Stefan Boberg
  270. Zoo           - Rahul Dhesi
  271. compress      - Unix distribution.  Unix is a trademark of AT&T.
  272. Perfect Sound - Anthony J. Wood
  273. Sound         - Richard Lee Stockton
  274. Upd           - Jonas Petersson
  275.